package com.dji.sample.wayline.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@TableName("flyer")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Flyer {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @JsonProperty("flyerName")
    @TableField("flyer_name")
    private String flyerName;

    @JsonProperty("phone")
    private String phone;

    @JsonProperty("email")
    private String email;

    //飞手状态（对应FlyerStatusEnum）
    @JsonProperty("status")
    private Integer status;

    @JsonProperty("credentialType")
    @TableField("credential_type")
    private String credentialType;

    @JsonProperty("credentialNo")
    @TableField("credential_no")
    private String credentialNo;

    @JsonProperty("credentialToTime")
    @TableField("credential_to_time")
    private Long credentialToTime;

    @JsonProperty("level")
    private Integer level;

    @JsonProperty("sumFlyTime")
    @TableField("sum_fly_time")
    private Long sumFlyTime;

    @JsonProperty("totalFlyCount")
    @TableField("total_fly_count")
    private Long totalFlyCount;

    @JsonProperty("securityLevel")
    @TableField("security_level")
    private Integer securityLevel;

    @JsonProperty("accidentCount")
    @TableField("accident_count")
    private Long accidentCount;

    @JsonProperty("illgalCount")
    @TableField("illgal_count")
    private Long illgalCount;

    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;
}
